/*
 * author M.Chang
 *
 * Copyright 2008 Ph.Bonnet and M.Chang
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
#ifndef DATASET_H_
#define DATASET_H_

#include <iostream>
#include <vector>
#include <set>
#include <sstream>

class DataSet
{
  public:
    DataSet();
    ~DataSet();

/*
    void addNode(int id);
    void addNodes(std::set<int> ids);
    void addAllNodes();
    void getSet(int node_id,
                std::string& domain_string,
                std::string& reward_string,
                std::string& energy_string,
                std::string& time_string,
                std::string& frequency_string,
                std::string& group_string);
*/

    void addFrequencySet(std::set<int> frequency_set);
    void addElement(int element, int reward, int energy, int time, int transmit, int bandwidth, int neighbor_energy, int neighbor_time);
    void getSet(std::string& domain_string,
                std::string& reward_string,
                std::string& energy_string,
                std::string& time_string,
                std::string& transmit_string,
                std::string& bandwidth_string,
                std::string& neighbor_energy_string,
                std::string& neighbor_time_string,
                std::string& frequency_string);

    bool empty();
    int getSize();
    void getDomain(std::set<int>& domain);
    void getFrequencyDomain(std::set<int>& domain);
    int getTotalReward();
    int getTotalEnergy();
    int getTotalTransmit();
    int getTotalBandwidth();
    int getTotalneighborEnergy();
    int getTotalneighborTime();
    int getTotalTime();

    std::string toString();

  private:
    std::vector<std::string>::size_type size;

    int total_reward;
    int total_energy;
    int total_time;
    int total_transmit;
    int total_bandwidth;
    int total_neighbor_energy;
    int total_neighbor_time;

/*
    std::set<int> nodes;
    bool allNodes;
    std::string groupId;
    static int nextGroupId;
*/

    std::set<int> domain_set;
    std::set<int> frequency_domain_set;
    std::vector<std::string> domain_vector;
    std::vector<std::string> reward_vector;
    std::vector<std::string> energy_vector;
    std::vector<std::string> time_vector;
    std::vector<std::string> transmit_vector;
    std::vector<std::string> bandwidth_vector;
    std::vector<std::string> neighbor_energy_vector;
    std::vector<std::string> neighbor_time_vector;
    std::vector<std::string> frequency_vector;

};



#endif /*DATASET_H_*/
